﻿<%@ Page Language="C#" MasterPageFile="~/car-insurance/Car_Insurance.master" AutoEventWireup="true"
    CodeFile="results-details.aspx.cs" EnableEventValidation="false" MaintainScrollPositionOnPostback="true"
    Async="true" Inherits="car_insurance_results_details" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register Src="~/controls/usrNoJS.ascx" TagName="usrNoJS" TagPrefix="ucNoJS" %>
<%@ Register Src="~/controls/usrPhoneNo.ascx" TagName="usrPhoneNo" TagPrefix="uc1" %>
<%@ Register Src="~/controls/usrIdNumber.ascx" TagName="usrIdNumber" TagPrefix="uc2" %>
<%@ Register Src="~/controls/usrDate.ascx" TagName="usrDate" TagPrefix="uc3" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <asp:ScriptManager ID="ScriptManager" runat="server">
    </asp:ScriptManager>
    <link rel="stylesheet" type="text/css" href="../css/forms_results.css" />
    <link rel="stylesheet" type="text/css" href="../css/button.css" />
    <!--[if lte IE 6]>
        <link rel="stylesheet" type="text/css" href="/css/IE6.css" />
    <![endif]--> 
    <style type="text/css">
        .modalBackground
        {
            background-color: Gray;
            filter: alpha(opacity=90);
            opacity: 0.8;
        }
    </style>
    <div class="elements_inner_wrapper">
        <ucNoJS:usrNoJS ID="usrNoJS1" runat="server" />
        <!-- #Include file="../includes/body_loader.inc" -->
        <div class="seperator">
        </div>

        <script type="text/javascript">
            IncreaseProgress(10);
        </script>

        <div id="divContent" style="display: none;">
            <h1>
                Car Insurance Comparison Details</h1>
            <table cellpadding="0" cellspacing="0" border="0" class="table_details" id="tblCarDetails"
                runat="server">
                <tr id="trTop" runat="server">
                    <td class="w312px">
                    </td>
                </tr>
                <tr id="trProvider" runat="server">
                    <td>
                    </td>
                </tr>
                <tr id="trPlan" runat="server">
                    <td class="pad7px txtleft">
                        <strong>Plan</strong>
                    </td>
                </tr>
                <tr id="trPrice" runat="server">
                    <td class="bg_grey_5 txtleft pad7px">
                        <strong>Annual Premium</strong>
                    </td>
                </tr>
                <tr id="trInstallment" runat="server">
                    <td class="border1pxdotb_light txtleft pad7px">
                        <strong>Monthly Installments</strong><br />
                        12-mth 0% Interest Free
                    </td>
                </tr>
                <tr id="trExcess" runat="server">
                    <td class="border1pxdotb_light txtleft pad7px">
                        <strong>Excess</strong> (named drivers)
                    </td>
                </tr>
                <tr id="trWorkshop" runat="server">
                    <td class="txtleft pad7px">
                        <strong>Workshop Plan</strong>
                    </td>
                </tr>
                <tr id="trPA" runat="server">
                    <td class="txtleft pad7px">
                        <strong>Personal Accident</strong> (insured)
                    </td>
                </tr>
                <tr id="trPA2" runat="server">
                    <td class="border1pxdotb_light txtleft pad7px">
                        <strong>Personal Accident</strong> (each passenger)
                    </td>
                </tr>
                <tr id="trMedExp" runat="server">
                    <td class="border1pxdotb_light txtleft pad7px">
                        <strong>Medical Expense</strong>
                    </td>
                </tr>
                <tr id="trLossPE" runat="server">
                    <td class="txtleft pad7px">
                        <strong>Loss of Personal Effects</strong>
                    </td>
                </tr>
                <tr id="trLossOfUse" runat="server">
                    <td class="txtleft pad7px">
                        <strong>Loss of Use</strong> (Benefit)
                    </td>
                </tr>
                <tr id="trWorkshopPDF" runat="server">
                    <td class="border1pxdotb_light txtleft pad7px">
                        <strong>View Workshops</strong>
                    </td>
                </tr>
                <tr id="trPolicy" runat="server">
                    <td class="border1pxdotb_light txtleft pad7px">
                        <strong>View Policy Wordings</strong>
                    </td>
                </tr>
                <tr id="trEndorsement" runat="server">
                    <td class="txtleft pad7px">
                        <strong>View Policy Endorsements</strong>
                    </td>
                </tr>
                <tr id="trBottom" runat="server">
                    <td>
                    </td>
                </tr>
            </table>
            <div class="seperator_15px">
            </div>
            <table cellpadding="0" cellspacing="0" border="0">
                <tr>
                    <td runat="server" id="tdBarLeft">
                    </td>
                    <td class="txtcenter" align="center">
                        <div class="hilite" style="width: 560px;" id="divBar" runat="server">
                            <div class="left">
                            </div>
                            <div class="content txtcenter" style="width: 548px" id="divCenterBar" runat="server">
                                <div class="pad7px">
                                    <strong>Interested in one of these offers?</strong></div>
                            </div>
                            <div class="right">
                            </div>
                        </div>
                    </td>
                </tr>
            </table>

            <script type="text/javascript">
                IncreaseProgress(35);
            </script>

            <table cellpadding="0" cellspacing="1" width="100%" border="0" class="table_details" id="tblArrows">
                <tr id="trArrows" runat="server">
                    <td class="w312px">
                    </td>
                </tr>
            </table>
            <div class="seperator">
            </div>

            <script type="text/javascript">
                IncreaseProgress(50);
            </script>

            <table cellpadding="0" cellspacing="0" border="0" class="table_details" id="tblOptions">
                <tr id="trTopOptions" runat="server">
                    <td class="w480px" runat="server" id="tdTopPad">
                    </td>
                </tr>
                <tr id="trBuyOnline" runat="server">
                    <td class="pad7px txtleft border1pxdotb_light">
                        <strong>Buy Online</strong>
                    </td>
                </tr>
                <tr id="trCallMe" runat="server">
                    <td class="pad7px txtleft border1pxdotb_light">
                        <strong>Call Me Request</strong>
                    </td>
                </tr>
                <tr id="trEmailMe" runat="server">
                    <td class="pad7px txtleft border1pxdotb_light">
                        <strong>Email Me</strong>
                    </td>
                </tr>
                <tr id="trEmailThis" runat="server">
                    <td class="pad7px txtleft">
                        <strong>Forward This</strong>
                    </td>
                </tr>
                
                <tr id="trBottomOptions" runat="server">
                    <td>
                    </td>
                </tr>
            </table>

            <script type="text/javascript">
                IncreaseProgress(75);
            </script>

            <div class="seperator">
            </div>
            <div class="seperator">
            </div>
            <div class="seperator_dashed">
            </div>
            <div class="seperator">
            </div>
            <asp:Button runat="server" ID="btnBack" Visible="true" onmousedown="this.className = 'button_back_mousedown';"
                onmouseup="this.className = 'button_back';" onmouseout="this.className = 'button_back';"
                CssClass="button_back" CausesValidation="false" OnClientClick="this.removeAttribute('onmouseout'); this.removeAttribute('onmouseup'); this.className = 'button_processing';"
                OnClick="btnBack_Click" />
            <div style="display: none;">
                <asp:LinkButton runat="server" ID="lnkbtnPopup" Text="click"></asp:LinkButton>
                <input id="inputProviderId" runat="server" type="hidden" />
                <input id="inputCarResultId" runat="server" type="hidden" />
                <input runat="server" id="inputCallMeMakeModel" type="hidden" />
                <input runat="server" id="inputCallMeCompanyName" type="hidden" />
            </div>
            <cc1:ModalPopupExtender ID="mpePopup" runat="server" DropShadow="true" PopupControlID="pnlPopup"
                BackgroundCssClass="modalBackground" TargetControlID="lnkbtnPopup" CancelControlID="btnClose"
                BehaviorID="mdlPopup">
            </cc1:ModalPopupExtender>
            <!-- Call to Action Popup | Start -->
            <asp:Panel ID="pnlPopup" runat="server" Style="display: none; background: white;"
                Width="595px">
                <div id="divPopup" style="padding: 10px; padding-top: 0px; height: auto">
                    <div style="width: 100%; height: 30px; text-align: right; margin-top: 3px;">
                        <div class="bg_grey_5 pad7px txtright" style="width: 560px; text-align: right;">
                            <a href="results-new.aspx" name="ctl00$ContentPlaceHolder1$btnClose" onclick="HidePanel();"
                                id="ctl00_ContentPlaceHolder1_btnClose">
                                <img src="/images/spacer.gif" id="btnClose" border="0" class="button_close" width="75"
                                    height="30" alt="Close" /></a>
                        </div>
                    </div>
                    <div style="margin-left: 15px; margin-top: 20px;">
                        <asp:Image ID="imgProvider" runat="server" Width="100px" /><br />
                    </div>
                    <table cellpadding="0" cellspacing="0" border="0" class="table_details" style="width: 580px;">
                        <tr>
                            <td width="220">
                            </td>
                            <td class="bg_grey_2" width="360">
                                <div>
                                    <div class="curvetopleft left">
                                    </div>
                                    <div class="curvetopright right">
                                    </div>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td class="txtleft pad7px border1pxdotb_light">
                                <strong>Your Full Name</strong>
                            </td>
                            <td class="bg_grey_2 pad7px border2pxdotb">
                                <asp:TextBox ID="txtFullName" Width="250" MaxLength="80" runat="server" ReadOnly="true"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td class="txtleft pad7px border1pxdotb_light">
                                <strong>Your E-mail</strong>
                            </td>
                            <td class="bg_grey_2 pad7px border2pxdotb">
                                <asp:TextBox ID="txtEmail" runat="server" Width="250" MaxLength="100" ReadOnly="true"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td class="txtleft pad7px border1pxdotb_light">
                                <strong>Your Mobile Number</strong>
                            </td>
                            <td class="bg_grey_2 pad7px border2pxdotb">
                                <uc1:usrPhoneNo ID="txtMobileNo" IsEnabled="true" IsRequired="true" PhoneNoRequireErrorMessage="Require mobile number."
                                    PhoneNoErrorMessage="Mobile phone number should 8 digits." PhoneNoValidErrorMessage="Invalid mobile phone number."
                                    runat="server" ValidationGroup="requestoptions" IsReadOnly="true" />
                            </td>
                        </tr>
                        <tr id="trCallMeOptions" style="display: none;">
                            <td class="txtleft pad7px border1pxdotb_light">
                                <strong>Call Me Request</strong>
                            </td>
                            <td class="bg_grey_2 pad7px border2pxdotb" valign="middle" >
                            <div style="float:left; width:130px; padding-top:10px; text-align:right;">       
                                <asp:DropDownList CssClass="blue" Font-Size="12px" runat="server" ID="ddlCallMeTime">
                                    <asp:ListItem Value="-1" Text="Select" />
                                    <asp:ListItem Value="1" Text="Morning" />
                                    <asp:ListItem Value="2" Text="Afternoon" />
                                    <asp:ListItem Value="3" Text="Evening" />
                                    <asp:ListItem Value="4" Text="AnyTime" />
                                </asp:DropDownList>
                                </div>
                                <asp:RequiredFieldValidator ID="rfvCallMeTime" runat="server" validationErrorCssClass="validationError"
                                    ValidationGroup="callme" ErrorMessage="" Text="" InitialValue="-1" ControlToValidate="ddlCallMeTime"></asp:RequiredFieldValidator>
                                    
                                     <asp:Button runat="server" ID="btnCallMe" CssClass="button_call-me" OnClick="btnCallMe_Click"
                                    ValidationGroup="callme" OnClientClick="LoadValidationErrorCss(); if (Page_ClientValidate('callme')){this.className = 'button_processing';}" />
                            </td>
                        </tr>
                       <%-- <tr id="trCallMePopup" style="display: none;">
                            <td class="txtleft pad7px">
                                <strong>Your Preference</strong>
                            </td>
                            <td class="bg_grey_2 pad7px">
                                <asp:Button runat="server" ID="btnCallMe" CssClass="button_call-me" OnClick="btnCallMe_Click"
                                    ValidationGroup="callme" OnClientClick="LoadValidationErrorCss(); if (Page_ClientValidate('callme')){this.className = 'button_processing';}" />
                            </td>
                        </tr>--%>
                        <tr id="trEmailMePopup" style="display: none;">
                            <td class="txtleft pad7px">
                                <strong>Your Preference</strong>
                            </td>
                            <td class="bg_grey_2 pad7px">
                                <asp:Button runat="server" ID="btnEmailMe" CssClass="button_email-me" OnClick="btnEmailMe_Click"  OnClientClick="this.className = 'button_processing';"/>
                            </td>
                        </tr>
                        <tr>
                            <td>
                            </td>
                            <td class="bg_grey_2 w210px">
                                <div>
                                    <div class="curvebottomleft left">
                                    </div>
                                    <div class="curvebottomright right">
                                    </div>
                                </div>
                            </td>
                        </tr>
                    </table>
                </div>
            </asp:Panel>
            <!-- Learn More Popup | End   -->
        </div>

        <script type="text/javascript">
            IncreaseProgress(95);
        </script>

    </div>

    <script type='text/javascript'>

        function HidePanel() {
            document.getElementById('<%=pnlPopup.ClientID%>').style.display = 'none';
        }

        function ShowPopup(_companyId, _carResultId, _companyName, _isCallMe) {

            document.getElementById('<%=inputProviderId.ClientID%>').value = _companyId;
            document.getElementById('<%=inputCarResultId.ClientID%>').value = _carResultId;
            document.getElementById('<%=inputCallMeCompanyName.ClientID%>').value = _companyName;

            if (_isCallMe == 'true') {
                document.getElementById('trCallMeOptions').style.display = '';
                //document.getElementById('trCallMePopup').style.display = '';
                document.getElementById('trEmailMePopup').style.display = 'none';
            }
            else {
                document.getElementById('trCallMeOptions').style.display = 'none';
                //document.getElementById('trCallMePopup').style.display = 'none';
                document.getElementById('trEmailMePopup').style.display = '';
            }

            imgurl = '';
            document.getElementById('<%=imgProvider.ClientID%>').src = '/images/public/logo/hsbc.png';

            if (_companyId == '23') {
                imgurl = '/images/public/logo/hsbc.png';
            }
            else if (_companyId == '29') {
                imgurl = '/images/public/logo/liberty.png';
            }
            else {
                imgurl = '/images/public/logo/etiqa.png';
            }

            document.getElementById('<%=imgProvider.ClientID%>').src = imgurl;

            var modpop = $find("mdlPopup");
            if (!modpop) { return; }
            modpop.show();
        }

        function OKNOW() {
            alert('ok');        
        }

        function OpenWorkshop(coid) {
           
            var winl = (screen.width - 840) / 2;
            var wint = (screen.height - 500) / 2;
            var settings = 'height=500,';
            settings += 'width=840,';
            settings += 'top=' + wint + ',';
            settings += 'left=' + winl + ',';
            settings += 'scrollbars=yes,';
            settings += 'resizable=No';            
            window.open('ViewProviderWorkShop.aspx?comid=' + coid, 'NEWWIN', settings);
        }

        IncreaseProgress(100);
        HideLoading();
                     
    </script>

</asp:Content>
